<script src="js/proinfo/purchased/buyingApplyFor-ALTER.js"></script>
<section id="main-content">
    <section class="ng-scope">
        <div class="wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        <header class="panel-heading">
                            请购申请【请购人申请（填写采购清单、资产库申请清单）】
                        </header>

                        <div class="panel-body">
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">项目名称</label>
                                <div class="col-sm-10" proj-name-list="applyInfo.projName">
                                    <!--<input type="text" list="browsers22" ng-model="applyInfo.projName" disabled-->
                                        <!--certus-required class="form-control" placeholder="自动检索，查询结果较多时候，系统不显示，需要尽量多输入相关字段">-->
                                    <!--<datalist id="browsers22" ng-model="selected">-->
                                        <!--<option ng-repeat="x in userProjSelect2" value="{{x.projName}}">-->
                                    <!--</datalist>-->
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">申请用途</label>
                                <div class="col-sm-10">
                                    <select ng-model="applyInfo.applicationCode" certus-required class="form-control">
                                        <option ng-repeat="x in select.applyForSelect" value="{{x.code}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">归属地选择</label>
                                <div class="col-sm-10">
                                    <select ng-model="applyInfo.affiliationCode" certus-required class="form-control">
                                        <option ng-repeat="x in select.affiliationSelect" value="{{x.code}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">申请说明</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" maxlength="120"  ng-model="applyInfo.applyInstruction"></textarea>
                                </div>
                            </div>
                        </div>
                    </section>
                    <section class="panel hdproc" style="display: none;">
                        <header class="panel-heading">
                            项目采购申请*
                        </header>
                        <div class="panel-body">
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">大类</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus_required_polyfill
                                        ng-model="applyItem.bigClassCode" ng-change="sbchanged(applyItem.bigClassCode)">
                                        <option ng-repeat="x in select.bigClassSelect" value="{{x.code}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm" ng-show="sbshow">
                                <label class="col-sm-2 control-label">资产类目</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus_required_polyfill
                                        ng-model="applyItem.commodityCateCode">
                                        <option ng-repeat="x in select.cateCodeSelect" value="{{x.code}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm" ng-show="sbshow">
                                <label class="col-sm-2 control-label">资产类别</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus_required_polyfill
                                        ng-model="applyItem.commodityClassCode">
                                        <option ng-repeat="x in select.classCodeSelect" value="{{x.code}}">{{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm" ng-show="sbbushow">
                                <label class="col-sm-2 control-label">类型说明</label>
                                <div class="col-sm-10">
                                    <input type="text" certus_required_polyfill class="form-control"
                                        ng-model="applyItem.typeMark">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">名称</label>
                                <div class="col-sm-10">
                                    <input type="text" certus_required_polyfill class="form-control"
                                        ng-model="applyItem.name">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">品名及规格</label>
                                <div class="col-sm-10">
                                    <input type="text" certus_required_polyfill class="form-control"
                                        ng-model="applyItem.descAndSpec">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">数量</label>
                                <div class="col-sm-10">
                                    <input type="text" onkeyup="clearNoNum(this)" onblur="clearNoNum(this)"
                                        certus_required_polyfill class="form-control" ng-model="applyItem.quantity">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">预估金额</label>
                                <div class="col-sm-10">
                                    <input type="text" onkeyup="clearNoNum(this)" onblur="clearNoNum(this)"
                                        certus_required_polyfill class="form-control"
                                        ng-model="applyItem.estimatedAmount">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" certus_required_polyfill
                                        ng-model="applyItem.remark"  maxlength="120" ></textarea>
                                </div>
                            </div>
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info"
                                    onclick="hdproc();">取消</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-info"
                                    ng-click="applyItemSubmit()">提交</a>
                            </p>
                        </div>
                    </section>
                    <section class="panel">
                        <header class="panel-heading">
                            采购申请清单
                            <i class="add-icon icon-plus" onclick="shproc();"> 新增</i>
                        </header>
                        <div class="panel-body">
                            <div id="proc1Container" class="dlshouwen-grid-container"></div>
                        </div>
                    </section>
                    <section class="panel">
                        <header class="panel-heading add-heading">
                            资产库申请清单
                            <i class="add-icon icon-plus" data-toggle="modal" href="#myModal"> 新增</i>
                        </header>
                        <div class="panel-body">
                            <div id="library1Container" class="dlshouwen-grid-container"></div>
                        </div>
                    </section>
                    <section class="panel">
                        <div class="panel-body">
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info"
                                    onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-success"
                                    ng-click="submmitPurchase()">确认提交</a>
                            </p>
                        </div>
                    </section>
                    <!-- Modal -->
                    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                        aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <section class="panel">
                                    <div class="panel-heading add-heading">
                                        资产库信息
                                        <i class="add-icon icon-remove" data-dismiss="modal" aria-hidden="true"></i>
                                    </div>
                                    <div class="panel-body">
                                        <div class="search-heading">
                                            <span>资产类目:</span>
                                            <select class="form-control">
                                                <option>请选择</option>
                                            </select>
                                            <span>资产类别:</span>
                                            <select class="form-control" ng-model="select.productType">
                                                <option ng-repeat="x in select.assetClassSelect" value="{{x.styleId}}">
                                                    {{x.assetStyle2}}
                                                </option>
                                            </select>
                                            <label class="label label-primary" ng-click="searchProduct()">搜索</label>
                                        </div>
                                        <div id="lidContainer" class="dlshouwen-grid-container"></div>
                                        <div id="lidToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                                    </div>
                                    <div class="panel-bg"></div>
                                </section>
                            </div>
                            <!-- /.modal-content -->
                        </div>
                        <!-- /.modal-dialog -->
                    </div>
                    <!-- /.modal -->
                    <!-- 流程跟踪V3.0效果 -->
                    <section>
                        <a href="javascript:void(0);" class="second" id="process" onclick="shaper();">
                            流程跟踪
                        </a>
                    </section>
                    <!-- 流程跟踪展示效果 -->
                    <section class="hdaper">
                        <div class="panel">
                            <div class="panel-heading add-heading">
                                流程跟踪
                                <i class="add-icon icon-remove" href="javascript:$.pageslide.close()"
                                    onclick="hdaper();"></i>
                            </div>
                            <div class="panel-body panel-proce">
                                <div class="proce-middle">
                                    <div class="proce-log" ng-repeat="trace in processCCBXTrace"
                                        ng-init="data=trace.msg">
                                        <div class="proce-log-lf">
                                            <!-- 虚线 -->
                                            <div class="log-dashed"></div>
                                        </div>
                                        <div class="proce-log-rg">
                                            <!-- 节点 -->
                                            <div class="log-mark">
                                                <!-- 标记点 -->
                                                <div ng-if="trace.isHead == 'headNode' && $index == 0">
                                                    <div class="log-mark-icon mark-prime">
                                                        发起
                                                    </div>
                                                </div>
                                                <div class="log-mark-icon mark-prime"> 发起</div>
                                            </div>
                                            <div ng-if="trace.lastStatus == 'sentback' && trace.beSentBack == 'N'">
                                                <div class="log-mark-icon mark-warning"> 被退回</div>
                                            </div>
                                            <div ng-if="trace.lastStatus == 'sentback' && trace.beSentBack == 'N'">
                                                <div class="log-mark-icon mark-warning"> 被退回</div>
                                            </div>
                                            <div ng-if="trace.lastStatus == 'denied'">
                                                <div class="log-mark-icon mark-warning">
                                                    回退
                                                </div>
                                            </div>
                                            <div ng-if="trace.lastStatus == 'completed'&& $index != 0">
                                                <div class="log-mark-icon mark-success">
                                                    同意
                                                </div>
                                            </div>
                                            <div ng-if="trace.lastStatus == 'others'&& $index != 0">
                                                <div class="log-mark-icon mark-success">
                                                    同意
                                                </div>
                                            </div>
                                            <div ng-if="trace.lastStatus == 'approvaling' && $index != 0">
                                                <div class="log-mark-icon mark-blue">
                                                    办理
                                                </div>
                                            </div>
                                            <div
                                                ng-if="trace.lastStatus == 'terminated' && $index != 0 && trace.isEnd != 'endNode'">
                                                <div class="log-mark-icon mark-danger">
                                                    拒绝
                                                </div>
                                            </div>
                                            <div
                                                ng-if="trace.isEnd == 'endNode'&& $index != 0 && trace.lastStatus == 'terminated'">
                                                <div class="log-mark-icon">
                                                    结束
                                                </div>
                                            </div>
                                            <!-- 对话框箭头 -->
                                            <div class="log-tag"></div>
                                            <!-- 节点内容 -->
                                            <div class="log-mark-value">
                                                <div class="log-mtitle">
                                                    <span
                                                        class="log-time">{{trace.time | date:'yyyy-MM-dd hh:mm'}}</span>

                                                    <div
                                                        ng-if="trace.lastStatus == 'approvaling' && trace.isHead != 'headNode' ">
                                                        <span class="log-status">状态：任务执行中
                                                            <i class="status-blue"></i>
                                                        </span>
                                                    </div>

                                                    <div
                                                        ng-if="trace.lastStatus == 'sentback' || trace.lastStatus == 'N'">
                                                        <span class="log-status">状态：已經被退回 <i></i> </span> </div>
                                                    <div
                                                        ng-if="trace.lastStatus == 'sentback' || trace.sendBack == 'Y'">
                                                        <span class="log-status">状态：正在重新提交 <i></i> </span> </div>
                                                    <div
                                                        ng-if="trace.lastStatus == 'completed' || trace.lastStatus == 'terminated' || trace.lastStatus == 'denied'">
                                                        <span class="log-status">状态：任务执行完毕
                                                            <i></i>
                                                        </span>
                                                    </div>


                                                    <div
                                                        ng-if="trace.isHead == 'headNode' && trace.lastStatus == 'approvaling'">
                                                        <span class="log-status">状态：子流程执行中
                                                            <i class="status-purple"></i>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="log-mbody">
                                                    <span class="log-name">办理人：{{trace.USER}}</span>
                                                    <span class="tp-txt">审批意见：{{trace.msg}}</span>
                                                    <input type="hidden" value="{{trace.msg}}" class="msgss" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                </div>
                <div class="paper-bg" onclick="clsbox();"></div>
    </section>
    </div>
    </div>
    </div>
</section>
</section>